#!/usr/bin/env python
# -*- coding:utf-8 -*-
#/home/zc/workspace/tinyfeet/trunk/src/controllers/sessionHandler.py
'''
session.set
session.get

weibouser:md5(access_token+uid)
user:base64(userobject -> string)

Created on 2012-3-30

@author: zc
'''

from hashlib import md5
import time

def session_get( session ):
    access_token = session.get( 'access_token', None )
    uid = session.get( 'uid', None )
    expires_in = session.get( 'expires_in', None )
    return access_token, uid, expires_in

def session_set( session, access_token, uid, expires_in ):
    session['access_token'] = access_token
    session['uid'] = int( uid )
    session['expires_in'] = expires_in
